#==================================================
#	@util Base
#==================================================
# @path: res://addons/code_editor_menu_button/util/@util_base.gd
# @datetime: 2021-7-29 22:43:21
#==================================================
class_name _CodeEditor_UtilBase


var _plugin : EditorPlugin


func set_plugin(value: EditorPlugin):
	_plugin = value
	
	# 脚本编辑器没有显示时，等待脚本编辑器显示出来
	var script_editor = get_editor_interface().get_script_editor()
	if not script_editor.visible:
		yield(script_editor, "visibility_changed")
	
	init_data()

func get_plugin() -> EditorPlugin:
	return _plugin


func get_editor_interface() -> EditorInterface:
	return _plugin.get_editor_interface()


## 初始化数据
func init_data():
	pass

